/*Copyright (c) 2020 Orca Data Technology(Xi'an)CO.LTD. All rights reserved. * Create by Jisr on 2022/3/7 2:52 PM*/
const useInProject = (projectName: string, fn: Function = (res: boolean) => res) => {
    return window.db.onPull('project').then((res: ProjectDir[]) => {
        const idx = res.findIndex((item) => {
            return item.name === projectName;
        });
        fn(idx !== -1);
    });
};
export default useInProject;
